package com.ele.Servlet;

import com.ele.Service.impl.BusinessServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/updateBusiness")
public class UpdateBusinessServlet extends HttpServlet {
    //
    BusinessServiceImpl businessService = new BusinessServiceImpl();
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");
        String account=req.getParameter("account");
        String password=req.getParameter("password");
        String telephone=req.getParameter("telephone");
        String contact=req.getParameter("contact");
        String id =req.getParameter("id");
        Integer x=businessService.UpdateBusiness( account, password, telephone, contact ,id);

        resp.getWriter().write(x+"");


    }
}
